﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Windows.Forms;
using System.Data.SqlClient;
using QLTV_V2.DataAccess;
using QLTV_V2.BussinessObject;

namespace QLTV_V2.BussinessLogic
{
    class LoginBUS
    {
        NhanVien nv = new NhanVien();
        ConnectData conn = new ConnectData();
        public bool ChekcUser(string username, string pass)
        {
            string sql = "SELECT * FROM NhanVien WHERE MaNV = '"+username+"' COLLATE SQL_Latin1_General_CP1_CS_AS "+
                         "AND MatKhau = '"+pass+"' COLLATE SQL_Latin1_General_CP1_CS_AS ";
            if (conn.ExecuteScalars(sql) == true)
            {
                return true;
            }
            return false;
        }
    }
}
